package com.warren.test;

import org.springframework.util.DigestUtils;

/**
 * @version V1.0
 * @Description:
 * @author: warren
 * @date: 2022/7/29$ 16:12$
 */
public class Sign {
    public static void main(String[] args) {
        String brand = "Diesel";
        String timestamp = "1659080516";
//        String key = "ar@123";
        String key = "ar@wise";
        String signStr = timestamp + "&" + key + "&" + brand;
        System.out.println(signStr);
        //"1659080516&ar@123&Diesel"
        String sign = DigestUtils.md5DigestAsHex((signStr).getBytes()).toUpperCase();
        System.out.println(sign);
        //EF28E996A2DD7E5192080D56711106F5
    }
}
